var menu = document.querySelector(".menu");
var container = document.querySelector(".container");
var list = document.querySelector(".list");
var iconMenu = document.querySelector(".icon-menu");
var iconClose = document.querySelector(".icon-close");
let flag = true;
menu.addEventListener("click", () => {
  let newAngle = flag ? -20 : 0;
  list.style.left = flag ? "0" : "-100px";
  iconMenu.style.top = flag ? "-100px" : "25px";
  iconMenu.style.left = flag ? "100px" : "25px";
  iconClose.style.top = flag ? "20px" : "100px";
  iconClose.style.left = flag ? "20px" : "-100px";
  flag = !flag;
  container.style.transform = "rotate(" + newAngle + "deg)";
});
